<!DOCTYPE html>
<html lang="en">
  <head>
<!--    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">-->
    <link rel="stylesheet" href="style.css">
     <link href='http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz:700' rel='stylesheet' type='text/css'> <link href='http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz:700' rel='stylesheet' type='text/css'>
    <title>Health Promotion</title>

        
  </head>

  <body id = "background">
       <?php
      include_once 'healthclass.php';
      include_once 'subdistrict.php';
      include_once 'choclass.php';
      
      ?>
<!--      <div style="height:120px"> </div>-->
     
      <div id = "homepage">
            
          <table style ="float: left; width: 150px">
              
              <tr>
                  <td>
<!--                    <div id = "navigation">
            <div><a href="index_1.php"><i class="fa fa-dashboard"></i> Dashboard</a></div>
            <div><a href="health.php"><i class="fa fa-table"></i>Health Promotions</a></div>
            <div class="active"><a href="charts.php"><i class="fa fa-bar-chart-o"></i> Questions And Answers</a></div>
            </div>  -->
                  </td>
                  
                 
                  </tr>
                  
          </table>
          
           <table>
                      <tr>
                  <!--<td style="background-color: yellow">g</td>-->
                  
                  <td>
                      <div id = "content"> 
                          <img src="Images/banner.jpg">
                          <div style="float: left; padding-left: 20px ">
                          <a class="mainMenu" href="index_1.php">Dashboard</a>
            <a class="mainMenu" href="health.php">Health Promotions</a>
            <a class="mainMenu" href="charts.php">Questions And Answers</a>
            
                      </div>
                          
                      <!--<h2>Health Promotions</h2>-->
<!--            <div style = "padding-left: 20px">
              <table class="reportTable">
                <thead>
                  <tr>
                    <th></th>
                    <th>Chief health Officer <i class="fa fa-sort"></i></th>
                    <th>Topic <i class="fa fa-sort"></i></th>
                    <th>Subdistrict <i class="fa fa-sort"></i></th>
                    <th>Venue <i class="fa fa-sort"></i></th>
                    <th>Month <i class="fa fa-sort"></i></th>
                    <th>Date <i class="fa fa-sort"></i></th>
                    <th> <i class="fa fa-sort"></i></th>
                  </tr>
                </thead>
                <tbody>
                    
                 <?php
                    $health = new healthclass();
                    $row = $health->get_all_health();
                    $row = $health->fetch();
                    $cho = new choclass();
                    $subd = new subdistrict();
                    
                    $chorow="";
                    $subdrow = "";
                    $row_counter=1;
                    while($row)
                    {
                        if($row_counter%2==0){
			$style=" class='row1' ";
		}else{
			$style=" class='row2'  ";
		}	
                    echo"<tr $style>";
                    $cho->get_cho_by_id($row['idcho']);
                    $chorow = $cho->fetch();
                    echo"<td>$row_counter</td>";
                    echo"<td id='id'>$chorow[cho_name]</td>";
                    echo"<td id='id'>$row[topic]uc</td>";
                    //$subdid = $row[subdistrict_id]; 
                    $subd->get_subdistrict_by_id($row['subdistrict_id']);
                    
                    $subdrow = $subd->fetch();
                    //print_r($subdrow). "this is subdrow";
                    echo"<td id='id'>$subdrow[subdistrict_name]</td>";
                    echo"<td id='id' >$row[venue]</td>";
                    echo"<td id='id'>$row[month]</td>";
                    echo"<td id='id'>$row[date]</td>";
                    echo"<td id='id'><a href ='#'>View details</a></td>";
                    echo"</tr>";
                    $row_counter++;
                    $row = $health->fetch();
                    }
                    
                    ?>
                </tbody>
              </table>
                      </div>-->
                  </td>
              </tr>
                  </table>  
      </div>
              </body>
</html>

     

    

                  
<!--                  <tr class="success">
                    <td>/about.html</td>
                    <td>261</td>
                    <td>33.3%</td>
                    <td>$234.12</td>
                  </tr>
                  <tr class="warning">
                    <td>/sales.html</td>
                    <td>665</td>
                    <td>21.3%</td>
                    <td>$16.34</td>
                  </tr>
                  <tr class="danger">
                    <td>/blog.html</td>
                    <td>9516</td>
                    <td>89.3%</td>
                    <td>$1644.43</td>
                  </tr>
                  <tr>
                    <td>/404.html</td>
                    <td>23</td>
                    <td>34.3%</td>
                    <td>$23.52</td>
                  </tr>
                  <tr>
                    <td>/services.html</td>
                    <td>421</td>
                    <td>60.3%</td>
                    <td>$724.32</td>
                  </tr>
                  <tr>
                    <td>/blog/post.html</td>
                    <td>1233</td>
                    <td>93.2%</td>
                    <td>$126.34</td>
                  </tr>-->
            
    <!-- JavaScript -->
    <script src="js/jquery-1.10.2.js"></script>
    <script src="js/bootstrap.js"></script>

    <!-- Page Specific Plugins -->
    <script src="js/tablesorter/jquery.tablesorter.js"></script>
    <script src="js/tablesorter/tables.js"></script>

  </body>
</html>